{include file='_header'}
<script type="text/javascript" src="__STATIC__/js/lib/moment.js"></script>
<link rel="stylesheet" href="__STATIC__/components/datetimepicker/jquery.datetimepicker.css">
<link rel="stylesheet" href="__STATIC__/components/daterangepicker/daterangepicker.css">
<style>
    .page-sub-toolbar{
        position: relative;
        width: 100%;
        padding-bottom: 15px;
        height: 45px;
        line-height: 1;
        vertical-align: middle;
        margin-bottom: 15px;
        border-bottom: 1px solid #efefef;
    }
</style>
<div class="page-header">
    当前位置：<span class="text-primary">{if !empty($item['id'])}编辑{else}添加{/if}商户 <small>{if !empty($item['id'])}修改【{$item['merchname']}】{/if}</small>
 </span>
</div>

<div class="page-content">
    <div class="page-sub-toolbar">
        <span class='pull-left'>
            <a class="btn btn-primary btn-sm" href="{:url('admin/merch/add')}">添加新商户</a>
        </span>
    </div>
<form id="setform" action="" method="post" class="form-horizontal form-validate">
<input type="hidden" id="tab" name="tab" value="#tab_basic" />
<div class="tabs-container">
    <ul class="nav nav-tabs" id="myTab">
        <li {if empty($_GET['tab']) || $_GET['tab']=='basic'}class="active"{/if}><a href="#tab_basic">基本</a></li>
        <li {if $_GET['tab']=='plugin'}class="active"{/if}><a href="#tab_plugin">应用权限</a></li>
    </ul>
    <div class="tab-content ">
        <div class="tab-pane {if empty($_GET['tab']) || $_GET['tab']=='basic'}active{/if}" id="tab_basic">{include file='merch/tab/basic'}</div>
        <div class="tab-pane {if $_GET['tab']=='plugin'}active{/if}" id="tab_plugin">{include file='merch/tab/plugin'}</div>
    </div>
</div>

<div class="form-group">
    <label class="col-lg control-label"></label>
    <div class="col-sm-9 col-xs-12">
        <input type="submit"  value="提交" class="btn btn-primary" />
        <a class="btn btn-default" href="{:url('admin/merch/user')}">返回列表</a>
    </div>
</div>

</form>
</div>
<script language='javascript'>
    require(['bootstrap'], function () {
        $('#myTab a').click(function (e) {
            $('#tab').val($(this).attr('href'));
            e.preventDefault();
            $(this).tab('show');
        })
    });
</script>
{include file='_footer'}

